package LuoGu.入门.Apple;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int [] num = new int[10];
        for(int i=0;i<10;i++) num[i] = s.nextInt();
        int tall = s.nextInt();
        tall+=30;
        int ans = 0;
        for(int i=0;i<10;i++){
            if(tall>=num[i]) ans++;
        }System.out.print(ans);
    }
}
